package rent.hj.launcher;

import android.graphics.Outline;
import android.view.View;
import android.view.ViewOutlineProvider;

/**
 * Created by admin on 2017/12/19.
 */

public class RoundViewOutlineProvider extends ViewOutlineProvider {

    private float radius = 5;

    public RoundViewOutlineProvider(float radius) {
        this.radius = radius;
    }

    @Override
    public void getOutline(View view, Outline outline) {
        outline.setRoundRect(0,0, view.getWidth(),view.getHeight(),radius);
    }
}
